package org.wanda.pv.model.business;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.nutz.dao.entity.annotation.*;
import org.wanda.pv.framework.base.BaseModel;
import org.wanda.pv.model.basic.Specialty;
import org.wanda.pv.model.basic.System;

/**
 * @author lxy
 */
@Table("wd_drawing")
public class Drawing extends BaseModel {

    @Column
    @Id
    @Prev(els = {@EL("$me.idGen()")})
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;


    @Column("system_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long systemId;

    @One(field = "systemId")
    private System system;

    @Column("spec_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long specId;

    @One(field = "specId")
    private Specialty specialty;

    @Column("project_flow_children_node_id")
    private String projectFlowChildrenNodeId;


    @Column("file_name")
    private String fileName;

    @Column("file_url")

    private String fileUrl;

    @Column("file_path")
    private String filePath;

    @Column
    private Boolean status;

    @Column
    @JsonSerialize(using = ToStringSerializer.class)
    private Long fid;

    @Column
    @JsonSerialize(using = ToStringSerializer.class)
    private Long tfid;

    @Column("png_width")
    @Comment("png宽度")
    private int pngWidth;

    @Column("png_height")
    @Comment("png高度")
    private int pngHeight;

    @Column("opinion_count")
    private int opinionCount;

    @Many(field = "drawingId")
    private Mark mark;


    public Long getSpecId() {
        return specId;
    }

    public void setSpecId(Long specId) {
        this.specId = specId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSystemId() {
        return systemId;
    }

    public void setSystemId(Long systemId) {
        this.systemId = systemId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    public Long getFid() {
        return fid;
    }

    public void setFid(Long fid) {
        this.fid = fid;
    }


    public int getPngWidth() {
        return pngWidth;
    }

    public void setPngWidth(int pngWidth) {
        this.pngWidth = pngWidth;
    }

    public int getPngHeight() {
        return pngHeight;
    }

    public void setPngHeight(int pngHeight) {
        this.pngHeight = pngHeight;
    }

    public String getProjectFlowChildrenNodeId() {
        return projectFlowChildrenNodeId;
    }

    public void setProjectFlowChildrenNodeId(String projectFlowChildrenNodeId) {
        this.projectFlowChildrenNodeId = projectFlowChildrenNodeId;
    }

    public int getOpinionCount() {
        return opinionCount;
    }

    public void setOpinionCount(int opinionCount) {
        this.opinionCount = opinionCount;
    }

    public Mark getMark() {
        return mark;
    }

    public void setMark(Mark mark) {
        this.mark = mark;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public Long getTfid() {
        return tfid;
    }

    public void setTfid(Long tfid) {
        this.tfid = tfid;
    }

    public System getSystem() {
        return system;
    }

    public void setSystem(System system) {
        this.system = system;
    }

    public Specialty getSpecialty() {
        return specialty;
    }

    public void setSpecialty(Specialty specialty) {
        this.specialty = specialty;
    }
}
